package library;

import org.jsoup.Connection;
import org.jsoup.Jsoup;
import org.jsoup.nodes.Document;

import systems.ConfigSystem;

import entities.SiteConfig;

public class PayFee {
	public static void payFee(int coin, String customer, String note) {
		
		SiteConfig siteConfig = ConfigSystem.getConfigs();
		
		try {
			String url = "http://" + siteConfig.getServerHatforrent() + "/payfee";
			
			Connection conn = Jsoup.connect(url);
			Document doc = conn
				.header("accept", "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8")
				.header("accept-Language", "en-us,en;q=0.5")
				.userAgent("Mozilla/5.0 (Windows NT 6.1; WOW64; rv:15.0) Gecko/20100101 Firefox/15.0.1")
				.data("coin", Integer.toString(coin))
				.data("customer", customer)
				.data("note", note)
				.followRedirects(false)
				.get();
			
		} catch (Exception e) {
			// TODO: handle exception
		}
	}
}
